package org.dg;

import java.util.ArrayList;

import org.dg.iag.dao.FeedDAO;
import org.restlet.Component;
import org.restlet.data.Protocol;
import org.restlet.resource.ServerResource;

public class TestFeedServer extends ServerResource{
	public static void main(String[] args) throws Exception {  
		final Component component	= InitialServer.component;
		component.getServers().add(Protocol.HTTP, 8182);
		component.getClients().add(Protocol.HTTP);
		component.getClients().add(Protocol.FILE);
		System.out.println( "Connections" +
		component.getContext().getParameters().getValues("maxConnectionsPerHost") );
		
		ArrayList<String> tags = new ArrayList<String>();
		tags.add("ewb_canada-water_sanitation_2011");
		FeedDAO	dao		= new FeedDAO();
		try {
			dao.storeAllFeeds(null);
		//	dao.storeAllFeedsTest(null, tags);
			System.out.println("end test");
//			dao.testGzip();
		} catch (Exception e) {
			e.printStackTrace();
		}
		System.out.println("ok");
	}

	
	public String toString() {  
		return "hello from iati collector";  
	}
}
